﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
using RiskMan.DataClass.Models.Plaza_II;

namespace RiskMan.Views.Plaza_II
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        //#region consts
        //public const Int32 MAX_ROWS_IN_TABLE = 100;
        
        //#endregion

        //#region variables

        //#region parameters
        //private ObservableCollection<Deal> _deals = new ObservableCollection<Deal>();
        //#endregion

        //#endregion

        //#region constructors
        //public Window1()
        //{
        //    InitializeComponent();
        //    StockClient.flagOpenWindow = true;
        //    StockClient.Instance.OnNewDealArrived += new StockClient.NewDealArrived(Stock_OnNewDealArrived);
     
        //    this.DataContext = _deals;
        //}
        //#endregion

        //#region event handlers
        //private void Stock_OnNewDealArrived(Deal deal)
        //{
        //    if (!this.Dispatcher.CheckAccess())
        //    {
        //        this.Dispatcher.BeginInvoke(
        //            DispatcherPriority.Normal,
        //            new StockClient.NewDealArrived(Stock_OnNewDealArrived),
        //            deal
        //        );
        //        return;
        //    }

        //    _deals.Add(deal);
        //    if (_deals.Count > MAX_ROWS_IN_TABLE)
        //    {
        //        _deals.RemoveAt(0);
        //    }
        //}
        //#endregion
    }
}
